package com.car.service.repair.impl;

import com.car.dao.repair.RepairDao;
import com.car.entity.Repair;
import com.car.service.repair.RepairService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class RepairServiceImpl implements RepairService {

    @Autowired
    private RepairDao repairDao ;

    @Override
    public Repair getRepairByIdQuery(int repairId) {
        return repairDao.getRepairByIdQuery(repairId);
    }

    @Override
    public List<Repair> getAllRepairQuery(Map<String, Object> paramsMap) {
        return repairDao.getAllRepairQuery(paramsMap);
    }

    @Override
    public int addRepairInsert(Repair repair) {
        return repairDao.addRepairInsert(repair);
    }

    @Override
    public int editRepairUpdate(Repair repair) {
        return repairDao.editRepairUpdate(repair);
    }

    @Override
    public int delRepairByIdDelete(Repair repair) {
        return repairDao.delRepairByIdDelete(repair);
    }

    @Override
    public int getRepairCountQuery(Map<String, Object> paramsMap) {


        return repairDao.getRepairCountQuery(paramsMap);
    }
}
